import { get, post } from "@/utils/methods";
import type {
  DigitalEmployeeResponse,
  DigitalEmployeesetResponse,
  PostRequestParams,
  PostRequestsearch,
  searchResponse,
  typeResponse,
  runDataResponse,
} from "./type";

//数字员工选择
export function DigitalEmployeeChoose(): Promise<DigitalEmployeeResponse> {
  return get("/index/DigitalEmployee/Choose");
}

//数字员工新增修改
export function DigitalEmployeeset(
  data: PostRequestParams
): Promise<DigitalEmployeesetResponse> {
  return post("/index/DigitalEmployee/set", data);
}

//数字员工搜索
export function DigitalEmployeesearch(
  data: PostRequestsearch
): Promise<searchResponse> {
  return post("/index/DigitalEmployee/search", data);
}

//员工查询
export function DigitalEmployeetype(): Promise<typeResponse> {
  return get("/index/DigitalEmployee/type");
}

//数字员工统计
export function DigitalEmployeerunData(): Promise<runDataResponse> {
  return get("/index/DigitalEmployee/runData");
}

interface delect {
  id: number;
}
export function DigitalEmployeeLeft(data: delect): Promise<runDataResponse> {
  return post("/index/DigitalEmployee/Left",data);
}
